import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;



public class TravelingSalesMan {


	public void init(){
		int array[][] =  new int [7][7];
		array = getInput(7,7,"src/Inputs/input.txt");
		NearestNeigbour nn = new  NearestNeigbour();
		//nn.solve(array, 7, 7);
	}
	
	
	public final static  int[][]  getInput(int x,int y, String path){
		int array[][] =  new int[x][y];
		BufferedReader br = null;
        try {
            File file = new File(path);
            br = new BufferedReader(
                 new InputStreamReader(
                 new FileInputStream(file)));
            String line;
            int cnt = 0;
            
            while( (line = br.readLine()) != null ) {
            String[]lines = line.split(" ");
            	
            		for(int i = 0;i<lines.length; i++){
            			try{
            				array[cnt][i] = Integer.parseInt(lines[i]);
            			}catch(Exception e){
            				array[cnt][i] = -1;
            			}
            		}
            	
            cnt++;
            }
            br.close();
        } catch(IOException e) {
            System.out.println("read error: " + e.getMessage());
        }
     

		return array;
	
	}
	
	protected void print(int [][] array){
		System.out.println(array.length);
	for(int i =0; i<array.length;i++){
		for(int j =0; j<array[0].length;j++){
			System.out.print(array[i][j]+" ");
		}
		System.out.println();
	}
}
}
